﻿using System;
using Newtonsoft.Json;

namespace CkSoftware.GroupMe.Sdk.Core.Dao
{
	/// <summary>
	/// Result DAO for any GroupMe async result. This is used if the API is returning immediately but requires processing time
	/// on the server. The current processing status can be requested using the returned results id.
	/// </summary>
	public class AsyncGroupMeApiResult
	{
		/// <summary>
		/// The results-id parsed as <see cref="Guid" />.
		/// </summary>
		[JsonIgnore]
		public Guid ResultsGuid
		{
			get { return Guid.Parse(ResultsId); }
		}

		/// <summary>
		/// The results id which can be used to request the current processing status from the API.
		/// </summary>
		[JsonProperty(PropertyName = "results_id")]
		public string ResultsId { get; set; }
	}
}